package com.heking.securityapp.entiry;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @Author 35574
 * @Date 2021/10/25
 * @Description
 */
public class ParcelableParent implements Parcelable {
    private String name;

    public ParcelableParent() {
    }

    public ParcelableParent(String name) {
        this.name = name;
    }

    protected ParcelableParent(Parcel in) {
        name = in.readString();
    }

    public static final Creator<ParcelableParent> CREATOR = new Creator<ParcelableParent>() {
        @Override
        public ParcelableParent createFromParcel(Parcel in) {
            return new ParcelableParent(in);
        }

        @Override
        public ParcelableParent[] newArray(int size) {
            return new ParcelableParent[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(name);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
